/*
 * memory controller
 */
#include "s3c2440_soc.h"
#include "uart.h"

// 设置NOR Flash 访问时间
void bank0_tacc_set(int val)
{
    BANKCON0 = val << 8;
}

int main(void)
{
    unsigned char ch;

    urat0_init();

    puts("Hello world!\n\r");

    while(1)
    {
        ch = getchar();
        putchar(ch); // 回显

        if(ch >= '0' && ch <= '7')
        {
            bank0_tacc_set(ch - '0');

            // led_test();
        }
        else
        {
            puts("Error: val should between 0~7 \n\r");
            puts("Enter the Tacc val: \n\r");
        }
    }

    return 0;
}